package cn.edu.scnu.user.mapper;

import cn.edu.scnu.pojo.PersonalUser;
import cn.edu.scnu.pojo.User;
import cn.edu.scnu.pojo.UserInfo;
import cn.edu.scnu.vo.Card;
import cn.edu.scnu.vo.PersonalUserVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface UserMapper {
    User checkUsername(@Param("username") String username);

    void registerUser(User user);

    void saveUser(PersonalUser user);

    PersonalUserVO getUserByUname(@Param("username") String username);

    void registerUserInfo(UserInfo userInfo);

    User queryUserNameAndPassword(User user);

    void updateImg(@Param("username") String username, @Param("url") String url);

    void updateNick(@Param("username") String username, @Param("nickname") String nickname);

    Map<String, String> getInfoByUsername(@Param("username") String username);

    List<Card> searchUsersByNickname(@Param("nickname") String nickname);
}
